home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / editors / aurora / akbd.a < prev    next >
Text File  |  1996-07-10  |  18KB  |  429 lines

  1.  
  2. //┌────────────────────────────────────────────────────────────────────┐
  3. //│ The Aurora Editor v1.20  - Keyboard and Mouse definitions          │
  4. //│                                                                    │
  5. //│ Please keep a backup copy of this file.                            │
  6. //│                                                                    │
  7. //│ For a description of these keyboard and mouse definitions and how  │
  8. //│ to change them, select the "Key/Mouse/Trans Config" item from the  │
  9. //│ "Help" pull-down menu. Then then select "Defining the Keyboard"    │
  10. //│ from the submenu.                                                  │
  11. //│                                                                    │
  12. //│ If you have made any changes, save this file and select "Restore   │
  13. //│ Settings" from the "Set" pulldown menu. Exit and re-enter the      │
  14. //│ editor for your changes to take effect.                            │
  15. //│                                                                    │
  16. //│ Key prefixes used:                                                 │
  17. //│   "k_c_" =  <Ctrl> keys                                            │
  18. //│   "k_a_" =  <Alt> keys                                             │
  19. //│   "k_s_" =  <Shift> keys                                           │
  20. //│                                                                    │
  21. //└────────────────────────────────────────────────────────────────────┘
  22.  
  23.  
  24.   // edit and file manager windows
  25.   obj  edit-fmgr (
  26.  
  27.   fun
  28.  
  29.     // Controls
  30.     ≡            (wquit %p)                  ,// close window
  31.  
  32.     // Menu activation
  33.     k_esc        (menb)                      ,// to last menu bar item
  34.     k_f10        (menb)                      ,// to last menu bar item
  35.     k_a_f10      (men)                       ,// last pull-down menu
  36.     k_f1         (menh)                      ,// help pull-down
  37.     k_a_t        (men2)                      ,// to last toolbar control
  38.  
  39.     // Scroll
  40.     k_c_home     (cptop)                     ,// to page top
  41.     k_c_end      (cpbot)                     ,// to page bottom
  42.     k_c_pgup     (cmov @ 1)                  ,// to file top
  43.     k_c_pgdn     (cmov @ (qtexend))          ,// to file bottom
  44.     k_pad5       (ladj @ -1)                 ,// center cursor
  45.     k_c_f9       (ladj @ 1)                  ,// scroll to page top
  46.     k_c_f10      (ladj @ (qwinp @ %y1d))     ,// scroll to page bottom
  47.     k_c_up       (scry -1)                   ,// scroll up one line
  48.     k_c_down     (scry  1)                   ,// scroll down one line
  49.     k_c_-        (clast)                     ,// to last cursor position
  50.  
  51.     // File
  52.     k_c_n        (newf)                      ,// new edit window
  53.     k_a_e        (askopen)                   ,// open prompt
  54.     k_a_z        (openlast)                  ,// open last window
  55.     k_a_-        (flis)                      ,// file list
  56.     k_a_q        (quit %p)                   ,// close window
  57.     k_a_x        (gquit %p)                  ,// close all windows
  58.     k_s_f1       (qref)                      ,// quick reference
  59.  
  60.     // Window
  61.     k_a_w        (wlis)                      ,// window list
  62.     k_c_z        (wmax)                      ,// maximize window
  63.     k_c_a        (wnex)                      ,// next window
  64.     k_f12        (wpre)                      ,// next window
  65.     k_s_f3       (wtilev)                    ,// tile vertical
  66.     k_s_f4       (wtileh)                    ,// tile horizontal
  67.     k_s_f5       (wcasc)                     ,// cascade
  68.     k_c_k+q      (wquit %p)                  ,// close window
  69.  
  70.     k_a_ins      (winsizt -2 -1 -2 -1  2)    ,// move window northwest
  71.     k_a_del      (winsizt  2  1  2  1  2)    ,// move window southeast
  72.  
  73.     // Search
  74.     k_c_s        (askscan)                   ,// file scan prompt
  75.     k_c_b        (mloc @ %t)                 ,// find top of block
  76.     k_c_6        (bget)                      ,// to previous bookmark
  77.  
  78.     // Print
  79.     k_c_p        (print)                     ,// print
  80.     k_a_p        (print %m)                  ,// print block
  81.  
  82.     // Set
  83.     k_c_f1       (vfont %t)                  ,// toggle video mode
  84.     k_a_f2       (setres)                    ,// restore settings
  85.  
  86.     // Macro
  87.     k_c_v        (askmcmd)                   ,// macro command prompt
  88.     k_a_f9       (askoscmd %ck)              ,// DOS command prompt
  89.     k_a_f8       (askoscap)                  ,// DOS capture prompt
  90.     k_f9         (osshell)                   ,// exit to DOS
  91.  
  92.     // Other
  93.     k_a_f5       (opena %atrn)               ,// edit translation table
  94.  
  95.     // Mouse
  96.     m_r_down_client    (men)                 ,// last menu pull-down
  97.     m_l_dbclick_bkgnd  (wlis)                .// window list
  98.  
  99.   ).
  100.  
  101.  
  102.   // Prompts and Edit windows
  103.   obj  prompt (
  104.  
  105.   fun
  106.  
  107.     // Cursor
  108.     k_left       (left)                      ,// move cursor left
  109.     k_right      (right)                     ,// move cursor right
  110.     k_home       (chome)                     ,// to column one
  111.     k_end        (ceol)                      ,// to end of line
  112.  
  113.     // Scroll
  114.     k_f7         (scrx (- (xpagsiz)))        ,// page left
  115.     k_f8         (scrx (xpagsiz))            ,// page right
  116.  
  117.     // Editing
  118.     k_ins        (cmtog)                     ,// toggle insert mode
  119.     k_del        (delch)                     ,// delete character
  120.     k_backspace  (baksp)                     ,// delete left character
  121.     k_f6         (leol)                      ,// erase to end of line
  122.     k_a_f6       (leol %l)                   ,// erase to beginning of line
  123.     k_c_t        (wrddel CSet)               ,// delete right word
  124.     k_c_[        (lit)                       ,// enter literal character
  125.     k_a_=        (wasc)                      ,// display ascii chart
  126.  
  127.     // Block
  128.     k_a_a        (mset %s)                   ,// mark character
  129.     k_a_b        (mset %r)                   ,// mark column
  130.     k_a_1        (wrdmrk CSet)               ,// mark word
  131.     k_a_2        (meol)                      ,// mark to end of line
  132.     k_a_u        (mdes)                      ,// unmark
  133.     k_a_c        (mcpyp. ceol)               ,// copy block to prompt
  134.  
  135.     // Prompt history
  136.     k_up         (wrtv %p)                   ,// retrieve prev prompt
  137.     k_down       (wrtv %n)                   ,// retrieve next prompt
  138.  
  139.     // Exit
  140.     k_esc        (quit)                      ,// quit prompt
  141.     k_a_q        (quit)                      ,// quit prompt
  142.  
  143.     // non-function keys
  144.     k_chr        (txt (qarg 2))              ,// typeable keys
  145.  
  146.  
  147.     // Mouse
  148.  
  149.     // mouse left button down                 // begin mouse mark
  150.     m_l_down_client (
  151.       arg  w x y r.
  152.       moubegmrk  x y MouMrkS.
  153.     ),
  154.  
  155.     // mouse move
  156.     m_move_client (                           // extend mouse mark
  157.       arg  x y r.
  158.       moumovmrk  x y.
  159.     ),
  160.  
  161.     // mouse left button up
  162.     m_l_up_client (                           // end mouse mark
  163.       arg  x y.
  164.       mouendmrk  x y
  165.     ).
  166.  
  167.   ).
  168.  
  169.  
  170.   // edit windows only
  171.   obj  edit (
  172.  
  173.   fun
  174.  
  175.     // tool bar
  176.     <≡>            (wtool)                   ,// close tool bar
  177.     <?>            (hlp 18 6 %f)             ,// tool bar help
  178.     <*>            (fmgr)                    ,// display file manager
  179.     </>            (wcopy)                   ,// copy window
  180.     <─>            (wspl %h)                 ,// split window horz
  181.     <|>            (wspl %v)                 ,// split window vert
  182.     <o>            (askopen)                 ,// open prompt
  183.     <s>            (save)                    ,// save file
  184.     <F>            (askfind)                 ,// find prompt
  185.     <f>            (finl)                    ,// do last find/replace
  186.     <r>            (mrfl %b)                 ,// reflow block
  187.     <«>            (undo)                    ,// undo last change
  188.     <»>            (undo %r)                 ,// redo last change
  189.     <>>            (mfld %f)                 ,// fold block
  190.     <<>            (lfld %u)                 ,// unfold line
  191.  
  192.     // Cursor
  193.     k_up           (up)                      ,// move cursor up
  194.     k_down         (down)                    ,// move cursor down
  195.     k_enter        (enteredit)               ,// enter key
  196.     k_tab          (ctab)                    ,// tab right
  197.     k_s_tab        (ctab %l)                 ,// tab left
  198.     k_c_left       (cwrd %l CSet)            ,// find left word
  199.     k_c_right      (cwrd %r CSet)            ,// find right word
  200.  
  201.     // File
  202.     k_a_i          (askopenins)              ,// open and insert prompt
  203.     k_c_]          (wrdlod CSetB)            ,// open file at cursor
  204.     k_a_n          (askname)                 ,// rename prompt
  205.     k_f3           (save)                    ,// save file
  206.     k_c_ins        (fpre)                    ,// next file
  207.     k_c_del        (fnex)                    ,// prev file
  208.     k_f4           (fmgr)                    ,// display file manager
  209.     k_a_q          (fquit %p)                ,// close file/window
  210.     k_c_x          (fquit %f)                ,// save & close file/window
  211.  
  212.     // Window
  213.     k_c_c          (wcopy)                   ,// copy window
  214.     k_a_h          (wspl %h)                 ,// split window horizontal
  215.     k_a_v          (wspl %v)                 ,// split window vertical
  216.     k_c_f8         (wtool)                   ,// display tool bar
  217.     k_c_f7         (wsty)                    ,// change window style
  218.  
  219.     // Block
  220.     k_a_l          (mset %l)                 ,// mark line
  221.     k_a_3          (mpgh %tb)                ,// mark paragraph
  222.     k_a_c          (mcpy)                    ,// copy block
  223.     k_a_o          (mmov %o)                 ,// overlay block
  224.     k_a_m          (mmov)                    ,// move block
  225.     k_c_m          (mmov %of)                ,// move block over
  226.     k_a_d          (mdel)                    ,// delete block
  227.     k_s_f7         (mshf -1)                 ,// unindent block
  228.     k_s_f8         (mshf 1)                  ,// indent block
  229.     k_c_k+f        (askmfill)                ,// fill block prompt
  230.     k_a_r          (mrfl %b)                 ,// reflow block
  231.     k_a_y          (mrfl %br)                ,// reflow & right just block
  232.     k_c_k+s        (msave)                   ,// save block
  233.     k_c_k+o        (msrt)                    ,// sort block
  234.     k_c_k+u        (mcase %u)                ,// change block to uppercase
  235.     k_c_k+c        (mjust %c)                ,// center block
  236.  
  237.     // Search
  238.     k_f5           (askfind)                 ,// find prompt
  239.     k_c_f          (askfind)                 ,// find prompt
  240.     k_c_g          (askrpl)                  ,// replace prompt
  241.     k_c_l          (finl)                    ,// do last find/replace
  242.     k_c_2          (bset)                    ,// set quick bookmark
  243.     k_c_j          (askglin)                 ,// go to line prompt
  244.     k_a_7          (cfld)                    ,// go to next fold
  245.     k_a_f3         (finm)                    ,// find matching char
  246.     k_a_f7         (finc)                    ,// go to compiler error
  247.  
  248.     // Fold
  249.     k_a_8          (lfld)                    ,// fold next line
  250.     k_a_9          (lfld %s)                 ,// unfold next line
  251.     k_a_0          (mflda %ua)               ,// unfold all
  252.     k_a_f          (mfld %f)                 ,// fold block
  253.     k_a_g          (lfld %u)                 ,// unfold line
  254.  
  255.     // Edit
  256.     k_c_u          (undo)                    ,// undo last change
  257.     k_c_y          (undo %r)                 ,// redo last change
  258.     k_c_enter      (lins %a)                 ,// insert line
  259.     k_c_backspace  (ldel)                    ,// delete line
  260.     k_a_s          (lspl)                    ,// split line
  261.     k_a_j          (ljoin)                   ,// join line
  262.     k_a_4          (ldup)                    ,// duplicate line
  263.     k_a_5          (lswp)                    ,// swap line
  264.     k_a_6          (lcen)                    ,// center line
  265.     k_a_f1         (lcom)                    ,// comment/uncomment line
  266.     k_c_k+t        (stamp)                   ,// date/time stamp
  267.     k_c_k+x        (exptab TabWidth)         ,// expand tabs
  268.  
  269.     // Clipboard
  270.     k_grey-        (clpcpy %d)               ,// cut
  271.     k_c_grey-      (clpcpy %ad)              ,// cut append
  272.     k_grey+        (clpcpy)                  ,// copy
  273.     k_c_grey+      (clpcpy %a)               ,// copy append
  274.     k_grey*        (clppst)                  ,// paste
  275.     k_c_grey*      (clppst %o)               ,// paste over
  276.     k_c_grey/      (clpclr)                  ,// clear clipboard
  277.  
  278.     // Set
  279.     k_c_w          (wmwrap)                  ,// word wrap toggle
  280.     k_c_d          (wmdraw)                  ,// line draw toggle
  281.     k_a_f4         (wmtran)                  ,// text translate toggle
  282.  
  283.     // non-function keys
  284.     k_chr          (txt (qarg 2))            ,// typeable keys
  285.  
  286.     // Other
  287.     k_c_q+q        (askkrep)                 ,// repeat last key
  288.  
  289.     // invoke a spell checker from within an edit window <F11>
  290.     // (replace "ss" with your favorite spell checker)
  291.     k_f11  (
  292.       save.                                   // save the current file
  293.       os (cat "ss " (qwinttl)) %ck.           // call spellchecker
  294.       refresh.                                // refresh current file
  295.     ),
  296.  
  297.  
  298.     // Mouse
  299.  
  300.     // double-click in client area
  301.     m_l_dbclick_client (                      // begin mouse mark (dbl-click)
  302.       arg  w x y r.
  303.       moubegmrk  x y MouMrkD %d.
  304.     ),
  305.  
  306.     // right button down (on title bar)
  307.     m_r_down_border (
  308.       arg  w x y r.
  309.       if (eq r 11 12) (fmgr).                 // display file manager
  310.     ).
  311.   ).
  312.  
  313.  
  314.   // file manager windows only
  315.   obj  fmgr (
  316.  
  317.   fun
  318.  
  319.     // Menu activation
  320.     k_tab          (men2)                    ,// to drive menu bar
  321.  
  322.     // Cursor
  323.     k_left         (scrx -1)                 ,// scroll left one column
  324.     k_right        (scrx  1)                 ,// scroll right one column
  325.     k_home         (cmov 1)                  ,// scroll to column one
  326.     k_up           (up)                      ,// move cursor up
  327.     k_down         (down)                    ,// move cursor down
  328.  
  329.     // File Manager commands (single character command codes)
  330.     k_chr (
  331.       arg  k c.
  332.       = %c (chc c %l).
  333.       if (eq c %o %e) (fopen c) (             // open file/directory
  334.       if (eq c %z)  (fopen %ze) (             // open maximized
  335.       if (eq c %b)  (fopen %b) (              // open binary file
  336.       if (eq c %y)  (fopen %be) (             // open binary in one window
  337.       if (eq c %k)  (fopenk) (                // open key macro file
  338.       if (eq c %m)  (fmov) (                  // move file
  339.       if (eq c %c)  (fcpy) (                  // copy file
  340.       if (eq c %d)  (fdel) (                  // delete file
  341.       if (eq c %n)  (fren) (                  // rename file
  342.       if (eq c %r)  (frun %c) (               // run program/batch file
  343.       if (eq c %p)  (fprt) (                  // print file
  344.       if (eq c %a)  (fatt) (                  // change file attributes
  345.       if (eq c %t)  (ftch) (                  // touch file
  346.       if (eq c " ") (fmtog) (                 // mark/unmark file
  347.  
  348.       // spell checker (replace "ss" with your favorite spell checker)
  349.       if (eq c %s) (
  350.         os (cat "ss " (dn)) %ck.
  351.       )(
  352.  
  353.       // image viewer (replace "picem" with your favorite viewer)
  354.       if (eq c %i) (
  355.         os (cat "picem " (dn)) %c.
  356.       )(
  357.  
  358.       // unarchive .ZIP or .LZH files
  359.       if (eq c %u)  (
  360.         = %f (dn).
  361.         os (cat (if (fin f ".lzh" %i) "lha e " "pkunzip ") f) %ck.
  362.         refresh.
  363.       )(
  364.  
  365.       // view .ZIP or .LZH archives
  366.       if (eq c %v) (
  367.         = %f (dn).
  368.         oscap (cat (if (fin f ".lzh" %i) "lha v " "pkunzip -v ") f).
  369.       )(
  370.  
  371.       )))))))))))))))))).
  372.     ),
  373.  
  374.     // File
  375.     k_c_backspace  (fpar)                    ,// parent directory
  376.  
  377.     // Mark
  378.     k_a_m          (fmrk)                    ,// mark all files
  379.     k_a_u          (fumrk)                   ,// unmark all
  380.  
  381.     // Command
  382.     k_enter        (fopen %1)                ,// open file (one only)
  383.     k_c_enter      (fopen %q)                ,// open file (close fmgr)
  384.     k_del          (fdel)                    ,// delete file
  385.  
  386.     // Sort
  387.     k_a_n          (fsrt %n)                 ,// sort by name
  388.     k_a_s          (fsrt %s)                 ,// sort by size
  389.     k_a_d          (fsrt %d)                 ,// sort by date/time
  390.     k_a_o          (fsrt %o)                 ,// no sort (DOS order)
  391.  
  392.     // Print
  393.     k_c_p          (print %d)                ,// print fmgr contents
  394.  
  395.  
  396.     // Mouse
  397.     m_l_dbclick_client (                      // double-click to open
  398.       fopen %1
  399.     ).
  400.  
  401.   ).
  402.  
  403.  
  404.   // movable/sizable windows
  405.   obj  win (
  406.  
  407.   fun
  408.     k_c_f5         (wkey)                    ,// move/size windows
  409.     k_c_f6         (wkey %p)                 .// pan video background
  410.  
  411.   ).
  412.  
  413.  
  414.   // all windows
  415.   obj  mon (
  416.  
  417.   fun
  418.     k_c_r          (krec)                    ,// record key macro toggle
  419.     k_c_e          (kplay)                   ,// play scrap key macro
  420.     k_c_i          (kdel)                    ,// erase scrap key macro
  421.  
  422.     // define compound key prefixes
  423.     k_c_k          (keyx %k_c_k)             ,// define <Ctrl-K> prefix
  424.     k_c_o          (keyx %k_c_o)             ,// define <Ctrl-O> prefix
  425.     k_c_q          (keyx %k_c_q)             .// define <Ctrl-Q> prefix
  426.  
  427.   ).
  428.  
  429.